import { message } from 'ant-design-vue';

/**
 * Shows message content with external package feature.
 * [duration] is in second.
 */
export default class MessageService {
  static showSuccess(msg: string, duration: number = 3): void {
    message.success(msg, duration);
  }

  static showError(msg: string, duration: number = 3): void {
    message.error(msg, duration);
  }

  static showWarning(msg: string, duration: number = 3): void {
    message.warning(msg, duration);
  }
}